
/*
 * 客户权限菜单配置列表
 * @Author: ljb
 * @Date: 2018-03-26 10:34:21
 * @Last Modified by: ljb
 * @Last Modified time: 2019-05-05 15:52:58
 */

import { $t } from 'src/i18n';

const ROLES = {
	SUPER_ADMIN: 'SUPER_MAN', // value 是后端返回的值
	FINANCE: 'FINANCE',
	CLERK: 'CLERK',
};

export default [
	{
		name: '/customer/staff',
		icon: 'person-stalker',
		text: $t('menus.staff_management'), // '职员管理',
		key: 'cust-staff',
		can_access_roles: [ROLES.SUPER_ADMIN],
	},
	{
		name: '/customer/store',
		icon: 'home',
		text: $t('menus.store_management'), // '店铺管理',
		key: 'cust-store',
		can_access_roles: [ROLES.SUPER_ADMIN],
	},
	{
		name: '/customer/company',
		icon: 'document',
		text: $t('menus.company_management'), // '公司信息管理',
		key: 'cust-company',
		can_access_roles: [ROLES.SUPER_ADMIN],
	},
	{
		name: '/customer/hair-assets',
		icon: 'folder',
		text: $t('menus.hair_assets_management'), // '发型素材管理',
		key: 'customer-hair-assets',
		can_access_roles: [ROLES.SUPER_ADMIN], // has_hair === 1
	},
	{
		name: '/customer/tryon-material',
		icon: 'ios-glasses-outline',
		text: $t('routers.tryon_material'), // '3D试戴素材管理',
		key: 'customer-tryon_material',
		can_access_roles: [ROLES.SUPER_ADMIN],
	},
	{
		name: '1',
		icon: 'social-codepen-outline',
		text: $t('menus.overall_makeup_management'), // '整体妆容管理',
		can_access_roles: [ROLES.SUPER_ADMIN],
		submenus: [
			{
				name: '/customer/overall-makeup',
				icon: 'happy-outline',
				text: $t('menus.overall_makeup'), // '整体妆容',
				key: 'customer-overall-makeup',
				can_access_roles: [ROLES.SUPER_ADMIN],
			},
			{
				name: '/customer/classification',
				icon: 'ionic',
				text: $t('menus.classify_management'), // '分类管理',
				key: 'customer-classification',
				can_access_roles: [ROLES.SUPER_ADMIN],
			},
		],
	},
	{
		name: '2',
		icon: 'help-buoy',
		text: $t('menus.product_management'), // '产品管理',
		can_access_roles: [ROLES.SUPER_ADMIN],
		key: 'customer-product-management',
		submenus: [
			{
				name: '/customer/product-brand',
				icon: 'android-playstore',
				text: $t('menus.product_brand'), // '品牌管理',
				key: 'customer-product-brand',
				can_access_roles: [ROLES.SUPER_ADMIN],
			},
			{
				name: '/customer/brand-series',
				icon: 'crop',
				text: $t('menus.brand_series_management'), // '品牌系列管理',
				key: 'cust-brand-series',
				can_access_roles: [ROLES.SUPER_ADMIN],
			},
			{
				name: '/customer/product',
				icon: 'plus-round',
				text: $t('menus.add_product'), // '产品列表',
				key: 'cust-product',
				can_access_roles: [ROLES.SUPER_ADMIN],
			},
			{
				name: '/customer/product-category',
				icon: 'help-buoy',
				text: $t('menus.product_category'), // '分类管理',
				key: 'customer-product-category',
				can_access_roles: [ROLES.SUPER_ADMIN],
			},
			{
				icon: 'ios-monitor',
				text: $t('menus.share_product'), // '共享产品库',
				key: 'customer-share-product',
				name: '/customer/share-product',
				can_access_roles: [ROLES.SUPER_ADMIN],
			},
		],
	},
	{
		name: '/customer/skin-test-management',
		can_access_roles: [ROLES.SUPER_ADMIN],
		icon: 'ios-medkit',
		text: $t('menus.skin_test_management'), // '肤质管理,
		key: 'customer-skin-test',
		submenus: [
			{
				name: '/customer/skin-test',
				can_access_roles: [ROLES.SUPER_ADMIN],
				icon: 'eye',
				text: $t('menus.skin_test_data'), // '检测数据',
				key: 'customer-skin-test',
			},
			{
				name: '/customer/expert-suggest',
				can_access_roles: [ROLES.SUPER_ADMIN],
				icon: 'person-stalker',
				text: $t('menus.expert_suggest'), // '专家建议',
				key: 'customer-expert-suggest',
			},
			// TODO 自定义分数关联
			{
				name: '/customer/custom-recommend-value',
				can_access_roles: [ROLES.SUPER_ADMIN],
				icon: 'wand',
				text: $t('menus.touch_recommend_value'), // '智能测肤推荐商品',
				key: 'customer-custom-recommend-value',
			},
			{
				name: '/customer/custom-recommend-wax',
				can_access_roles: [ROLES.SUPER_ADMIN],
				icon: 'wand',
				text: $t('menus.img_recommend_value'), // '3D测肤推荐商品',
				key: 'customer-custom-recommend-wax',
			},
		],
	},
	{
		name: '3',
		icon: 'social-chrome-outline',
		text: $t('menus.device_management'), // '设备管理',
		can_access_roles: [ROLES.SUPER_ADMIN],
		submenus: [
			{
				name: '/customer/device-account',
				icon: 'cube',
				text: $t('menus.device_account_management'), // '设备账号管理',
				key: 'customer-device-account',
				can_access_roles: [ROLES.SUPER_ADMIN],
			},
			{
				name: '/customer/banner',
				icon: 'android-image',
				text: $t('menus.banner_management'), // 'Banner管理',
				key: 'customer-device-banner',
				can_access_roles: [ROLES.SUPER_ADMIN],
			},
			{
				name: '/customer/advert',
				icon: 'android-playstore',
				text: $t('menus.advertising_management'), // '广告管理',
				key: 'customer-device-advert',
				can_access_roles: [ROLES.SUPER_ADMIN],
			},
		],
	},
	{
		name: 'order',
		icon: 'briefcase',
		text: $t('menus.youzan_management'),		// 有赞商城
		can_access_roles: [ROLES.SUPER_ADMIN],
		submenus: [
			{
				name: '/customer/youzan-authorize',
				icon: 'android-sync',
				text: $t('menus.youzan_authorize'),	// 有赞授权
				key: 'customer-youzan-authorize',
				can_access_roles: [ROLES.SUPER_ADMIN],
			},
			{
				name: '/customer/youzan-product',
				icon: 'briefcase',
				text: $t('menus.youzan_product'),	// 有赞产品
				key: 'customer-youzan-product',
				can_access_roles: [ROLES.SUPER_ADMIN],
			},
			{
				name: '/customer/youzan-order',
				icon: 'ios-list-outline',
				text: $t('menus.favorable_order'), // 有赞订单列表
				key: 'customer-youzan-order',
				can_access_roles: [ROLES.SUPER_ADMIN],
			},
		],
	},
];
